//
//  ZTNetTest.m
//  YSSmartHome
//
//  Created by Yahaong on 16/9/1.
//  Copyright © 2016年 yahaong. All rights reserved.
//

#import "ZTNetTest.h"
#import "MQTTCoverTool.h"
#import "GlobalConst.h"
#import "YHProgressHUD.h"
#import <XAISDK/XAIPKT.h>
@interface ZTNetTest ()


@end
@implementation ZTNetTest

-(void)sendHello
{
    XAITYPEAPSN apsn = kMQTTSessionManager.currentUser.apsn;
    XAITYPELUID luid = kMQTTSessionManager.currentUser.luid;
    XAIPKT* pkt = [[XAIPKT alloc]init];
    pkt.fromApsn = apsn;
    pkt.fromLuid = luid;
    pkt.toApsn = apsn;
    pkt.toLuid = luid;
    pkt.flag = XAI_PKT_TYPE_HELLO;
    pkt.magicNum = 0;
    [kMQTTSessionManager send:pkt];
    dispatch_async(dispatch_get_main_queue(), ^{
        _DEF_MQTT_TIME_Start
    });
    
}

-(void)timeout
{
    debugLogInfo(@"网络测试超时了啊");
//    [[MQTTSessionManager sharedManager].packetManager setConnectDelegate:nil];
//    [[NSNotificationCenter defaultCenter]postNotificationName:kZTLoginEoorOrTimeOutNotifKey object:nil];
}
@end
